added cors support for login and update user