Minor changes

-Added logout method
-After login and registering user will be redirected to main page