Changed code to fit company conventions and changed login to a put method instead of post