setup registration and logging in