Added redirect for successful registration
-it will redirect on login page
added redirect to home when already logged in and session timeout
when browser is closed