Added receiving end for server from app + adding login functionality