Login updated

Added redirection after login, js moved from login.html.