Fixed security issues while loging in or updating users