Enhancement - Adding more unit tests for the user model, focusing on security aspects

adding security related unit tests to the user model