Upadting functionality. Added login system