properly namespaced the login controller
added js code to be passed between back and front ends