Updated check_user to return struct on success