Implemented Registration and Login

A user is now able to login, and also to register. Various methods were
created to allow this.