move login and register forms into partials and clean up js