Implements login and register system