Changed register and login to methods instead of being hardcoded.
Removed some unneeded code, might be needed later but for now it will
work since we wont interupt the transmission between client <-> server