updated server code for login and registration api
updated ios code to fix login and registration