Completely rewritten the code

This is a fully functional member area. The admin section will be coming
soon :)