updated main layout
move RedirectAuthenticator from models to lib