fixing authentication and tweaking registration