Fixing up application.js controller for logging in