login system fully working. Need to improve security for cookies