added login forms, redirects & refactored login