first version working registration and login