Fix scope apply causing rendering error in login controller