def user_identity_check(user, password):
    """
    Check if user is not null and have exact password as the given ones.

    For now we just store the plain text password, do not need to hash it.
    :param user: object that have username and password attribute.
    :type user: models.UserModel
    :param password: plaintext password string.
    :type password: str
    """
    if user is None:
        return 0, {'return': {'error': 'User does not existed!'}}
    if user.password != password:
        return 0, {'return': {'error': 'Authentication failed!'}}
    return 1,
