Implements login
Implements register