authentication functionality added, only register atm, authenticate to follow