Include this gem into your project with OmniAuth gem and you will get VKontakte login in one line of code.
Igor Alexandrov
k.A.