Added login functionality and mysql interaction