Finished most of the authentication logic, and member model logic