first commit of cleaned code

Code is about to be fully cleaned up and include new features and
better speed. This is the first commit including all user_auth features.