Updates the login state to include controllerAs and makes the login controller an IIFE