Fixed httpstatus code functionality in login and registration