Changed id property to username and updated login controller