Macbook pro keeps returning to login window
Are you sure it's the full login screen or is it just asking for your password?

If so, you can turn off "Require Password ______ after sleep or screen saver begins" in the "Security and Privacy" system preference.