Fixed the INSERT query method and logging in.