layout
improved login and redirect