working registration and login