src/main/java/com/danielezihe/controllers/UserController.java
/**
     * Logs a user in by verifying the users Email and Password against the record
     * stored in the OrderedMap
     * @param email email of user to be logged in
     * @param password password of user to be logged in
     * @param <T>
     * @return {@link UserEntity} instance of the User if login is successful
     * "INVALID_USER" if user email is not found.
     * "INCORRECT_DETAILS" if password is wrong.
     */
Logs a user in by verifying the users Email and Password against the record
stored in the OrderedMap
@param email email of user to be logged in
@param password password of user to be logged in
@param 
@return  UserEntity instance of the User if login is successful
"INVALID_USER" if user email is not found.
"INCORRECT_DETAILS" if password is wrong.
Logs a user in by verifying the users Email and Password against the record stored in the OrderedMap @param email email of user to be logged in @param password password of user to be logged in @param @return UserEntity instance of the User if login is successful " INVALID_USER " if user email is not found . " INCORRECT_DETAILS " if password is wrong .
public <T> T login(String email, String password) {
        UserEntity user = users.get(email);
        if (user == null)
            return (T) "INVALID USER";
        if (!verifyPassword(password, user.getPassword())) {
            return (T) "INCORRECT DETAILS";
        } else {
            return (T) user;
        }
    }
public < T > T login ( String email , String password ) { UserEntity user = users . get ( email ) ; if ( user == null ) return ( T ) "INVALID USER" ; if ( ! verifyPassword ( password , user . getPassword ( ) ) ) { return ( T ) "INCORRECT DETAILS" ; } else { return ( T ) user ; } }
Logs a user in by verifying the users Email and Password against the record
 stored in the OrderedMap
 @param email email of user to be logged in
 @param password password of user to be logged in
 @param <T>
 @return {@link UserEntity} instance of the User if login is successful
 "INVALID_USER" if user email is not found.
Logs a user in by verifying the users Email and Password against the record stored in the OrderedMap @param email email of user to be logged in @param password password of user to be logged in @param <T > @return { @link UserEntity } instance of the User if login is successful " INVALID_USER " if user email is not found .