Made login and registration connection to the server. And fixed bugs with server connection.