frontend for login and register layers