Small bug fixes and fixed user registration process