Updated login controller and fix for web api handler